﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/UserCenter.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%:SiteResource.Title() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript">
    function expan(n) {
        if (detail1.className == "listbox-item-c") {
            detail1.className = "listbox-item-e";
            link.innerHTML = "收起";
        }
        else {
            detail1.className = "listbox-item-c";
            link.innerHTML = "展开";
        }
    }
    function OpenPosition(sender) {
        $(sender).parent().siblings('div').children('a').eq(0).trigger('click');
    }
</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <div class="usercenter-main">
        <div class="usercenter-main-topbg">
        </div>
        <div class="usercenter-main-content">
            <div class="usercenter-messagebox">
                Important Messages!
            </div>
            <div class="usercenter-main-content-title">
                <div class="usercenter-main-content-title-left">
                    兼职管理</div>
            </div>
            <div class="usercenter-notes">
                大学生兼职网提供免费兼职发布平台，请发布真实的兼职信息！若发现商家发布虚假兼职，我们将严厉处理！</div>
            <div class="usercenter-tab">
                <div class="usercenter-tab-item">
                    <a href="javascript:;" class="current-red">推荐兼职</a></div>
            </div>
            <div class="listbox">
            <%var list = ViewData["Data"] as ItemListBox<RecruitSheetModel>;
              foreach (var item in list.Data)
              { %>
                <div class="listbox-item">
                    <div class="listbox-item-title">
                        <div class="left">
                            -[<%:item.PublishDate.ToLongDateString() %>]<b>&nbsp;[<%:item.WorkArea.Mapping() %>]</b>&nbsp;
                            <a href="javascript:;" onclick="OpenPosition(this)"><%:item.Caption %></a></div>
                        <div class="right">
                             招募空缺<%:item.Positions.Sum(c=>c.Vacancy) %>人&nbsp;
                            <a onclick="expan()" id="link">展开</a>&nbsp;
                            <a target="_blank" href="/home/jobdetail_<%:item.Id %>">查看详情</a>&nbsp;
                        </div>
                    </div>
                    <div id="detail1" class="listbox-item-c">
                        <div class="listbox-item-positions">
                            <%foreach(var position in item.Positions)
                              { %>
                            <div class="positions-item">
                                <div class="left">
                                    <a target="_blank" href="/home/jobdetail_<%:item.Id %>">-<%:position.PositionName %></a></div>
                                <div class="right">
                                    需招募<%:position.Vacancy %>人&nbsp;&nbsp;&nbsp;<a target="_blank" href="/home/jobdetail_<%:item.Id %>">查看详情</a></div>
                            </div>
                            <%} %>
                        </div>
                    </div>
                    <div class="listbox-item-bottomline">
                    </div>
                </div>
            <%} %>
                <div class="listbox-bottom">
                    <div class="listbox-bottom-item">
                        <!--下一页-->
                        <%if (list.NextPage <= 0 || list.NextPage >= list.TotlePage-1)
                          { %>
                          <a class="next1" href="javascript:;"></a>
                        <%}
                          else
                          { %>
                        <a class="next" href="?page=<%:list.NextPage %>"></a>
                        <%} %>
                    </div>
                    <div class="listbox-bottom-item">
                        <!--上一页-->
                        <%if (list.CurrentPage != 1 && list.PrePage <= 0)
                          { %>
                          <a class="prev1" href="javascript:;"></a>
                        <%}
                          else
                          { %>
                        <a class="prev" href="?page=<%:list.PrePage %>"></a>
                        <%} %>
                    </div>
                    <div class="listbox-bottom-item">
                        <%:list.CurrentPage + 1%>/<%:list.TotlePage%>&nbsp;&nbsp;&nbsp;
                    </div>
                </div>
            </div>
        </div>
        <div class="usercenter-main-bottombg">
        </div>
    </div>
</asp:Content>
